package com.ym.fc.controller;

import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author yanm
 * @date 2021/1/7 15:34
 **/
@RestController
@RequestMapping("v1/api")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class MainController {

    @RequestMapping("home")
    public ModelAndView indexPage(){
        return new ModelAndView("index");
    }

    @RequestMapping("login")
    public ModelAndView loginPage(){
        return new ModelAndView("login");
    }

    @RequestMapping("register")
    public ModelAndView registerPage(){
        return new ModelAndView("register");
    }
}
